// 角色管理页面相关api
import request from '@/utils/request'

// 获取角色分页列表
// /admin/acl/role/{page}/{limit}  get
export const reqGetRoleList = (page, limit, searchObj) => request({ url: `/admin/acl/role/${page}/${limit}`, method: 'get', params: searchObj })

// 新增角色
// /admin/acl/role/save post
export const reqAddRole = (role) => request({ url: `/admin/acl/role/save`, method: 'post', data: role })

// 修改角色
// /admin/acl/role/update put
export const reqUpdataRole = (role) => request({ url: `/admin/acl/role/update`, method: 'put', data: role })

// 获取角色信息
// /admin/acl/role/get/{id} get
export const reqGetRole = (id) => request({ url: `/admin/acl/role/get/${id}`, method: 'get' })

// 删除角色
// /admin/acl/role/remove/{id} delete
export const reqDeleteRole = (id) => request({ url: `/admin/acl/role/remove/${id}`, method: 'delete' })

// 删除角色列表
// /admin/acl/role/batchRemove delete
export const reqDeleteRoleList = (idList) => request({ url: `/admin/acl/role/batchRemove`, method: 'delete', data: idList })

// 根据角色获取菜单
// /admin/acl/permission/toAssign/{roleId} get
export const reqGetPermission = (roleId) => request({ url: `/admin/acl/permission/toAssign/${roleId}`, method: 'get', })

// 给角色分配权限
// /admin/acl/permission/doAssignAcl post
export const reqDoAssignAcl = (data) => request({ url: `/admin/acl/permission/doAssignAcl`, method: 'post', data: data })




